package com.hmall.user.util;

public class UserUtil {
    private static ThreadLocal<Long> tl = new ThreadLocal();

    public static void setUserId(Long userId){
        tl.set(userId);
    }

    public static Long getUserId(){
        return tl.get();
    }
    public static void removeUser(){
        tl.remove();
    }
}
